package com.google.code.instrumentation.logging;

import javassist.CannotCompileException;
import javassist.CtMethod;

public abstract class AbstractMethodInstrumentor implements
		LoggingMethodInstrumentor {

	protected final CtMethod ctMethod;

	protected AbstractMethodInstrumentor(final CtMethod method) {
		this.ctMethod = method;
	}

	@Override
	public void instrumentMethod() throws CannotCompileException {
		if (!ctMethod.isEmpty()) {
			addLogStart();
			addLogEnd();
		}
	}

}